package com.ruoyi.commodity.domain.vo;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.ruoyi.commodity.domain.ProductCustomQualityItem;
import com.ruoyi.commodity.domain.QualityTemplateItem;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class ProductVO extends BaseEntity {
	private static final long serialVersionUID = 1L;

	/** 商品id */
	private Long id;

	/** 店铺id */
	private Long authId;

	/** 产品类型id （关联tb_product_cates表id） */
	private Long catesId;

	/** 品牌 */
	private Long brandId;

	/** 品牌名称 */
	private String brandName;

	/** 商品名称 */
	@Excel(name = "商品名称")
	private String name;

	/** 商品编号 （从100001开始递增的编码） */
	@Excel(name = "商品编号 ", readConverterExp = "从=100001开始递增的编码")
	private String proNo;

	/** 商品规格型号 */
	private String model;

	/** OEM */
	private Long oem;

	/** 排序 */
	private Long sort;

	/** 产品SKU */
	@Excel(name = "产品SKU")
	private String sku;

	/** 产品介绍 */
	@Excel(name = "产品介绍")
	private String desc;

	/** 产品备注 */
	@Excel(name = "产品备注")
	private String productRemarks;

	/** 产品备注图片 */
	@Excel(name = "产品备注图片")
	private List<String> productRemarksImgName;

	/** 产品链接 */
	@Excel(name = "产品链接")
	private String productUrl;

	/** 状态 */
	@Excel(name = "状态")
	private String status;

	/** 商品图片 */
	@Excel(name = "商品图片")
	private List<String> imgName;

	/** 发布时间 */
	private Date addTime;

	/** 单品尺寸 */
	@Excel(name = "单品尺寸")
	private String size;

	/** 产品重量 */
	@Excel(name = "产品重量")
	private BigDecimal productWeight;

	/** 颜色 */
	@Excel(name = "颜色")
	private String colorId;

	/** 商品价格 */
	@Excel(name = "商品价格")
	private BigDecimal price;

	/** 交货周期 */
	@Excel(name = "交货周期")
	private String leadTime;

	/** 包装清单 */
	@Excel(name = "包装清单")
	private String packingList;

	/** 属性 */
	@Excel(name = "属性")
	private String attribute;

	/** 接收属性 */
	@Excel(name = "接收属性")
	private List<String> attributes;

	/** 产品类型 */
	@Excel(name = "产品类型")
	private Integer flag;


	private Boolean variantOperation; // 用于区分是否是变体产品

	private Long productId;

	private BigDecimal packageWeight;

	private BigDecimal cost;

	private Long operSize;

	private String containerSize;

	private String packageSize;

	private Long boxSize;

	private String packMaterial;

	private String productMaterial;

	private Long vendorId;

	private String deleteStatus;

	private BigDecimal turnoverBoxWeight;

	private Long salesPlanId;

	private BigDecimal amount;

	private Long[] shipmentsIds;

	private Long[] shipmentsProductIds;

	private Integer pairedSupplier; // 产品是否配对了供应商搜索框接收属性

	private List<String> gtins; // 产品是否配对了供应商搜索框接收属性

	/**
	 * 质检方式
	 */
	private Long inspectionMethod;

	/**
	 * 质检模板
	 */
	private Long templateId;

	/**
	 * 质检模板图片路径(返回给前段的数据)
	 */
	private List<String> images;


	/**
	 * 产品质检项
	 */
	private List<ProductCustomQualityItem> customQualityCheck;

	/**
	 * 起始页数
	 */
	private int pageNum;

	/**
	 * 每页数
	 */
	private int pageSize;

	@Override
	public String toString() {
		return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
				.append("id", getId())
				.append("catesId", getCatesId())
				.append("brandId", getBrandId())
				.append("name", getName())
				.append("proNo", getProNo())
				.append("model", getModel())
				.append("oem", getOem())
				.append("sort", getSort())
				.append("sku", getSku())
				.append("desc", getDesc())
				.append("remark", getRemark())
				.append("status", getStatus())
				.append("imgName", getImgName())
				.append("addTime", getAddTime())
				.append("updateTime", getUpdateTime())
				.append("size",getSize())
				.append("productWeight",getProductWeight())
				.append("colorId",getColorId())
				.append("price",getPrice())
				.append("leadTime",getLeadTime())
				.append("productId",getProductId())
				.append("packageWeight",getPackageWeight())
				.append("cost",getCost())
				.append("operSize",getOperSize())
				.append("containerSize",getContainerSize())
				.append("packageSize",getPackageSize())
				.append("boxSize",getBoxSize())
				.append("packMaterial",getPackMaterial())
				.append("productMaterial",getProductMaterial())
				.append("vendorId",getVendorId())
				.append("deleteStatus",getDeleteStatus())
				.append("productRemarks",getProductRemarks())
				.toString();
	}
}
